package com.aizuda.boot.modules.business.contract.mapper;

import com.aizuda.boot.modules.business.contract.entity.WorkflowNodeEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface WorkflowNodeMapper extends BaseMapper<WorkflowNodeEntity> {

    @Select("SELECT * FROM workflow_node WHERE workflow_id = #{workflowId} ORDER BY order_num ASC LIMIT 1")
    WorkflowNodeEntity selectFirstNode(@Param("workflowId") Integer workflowId);
}